package Code.ClassDefinition;

public class GirlFriendTest {
    public static void main(String[] args) {

        //创建对象
        GirlFriend g1 = new GirlFriend();

        //赋值
        System.out.println(g1.name);
        System.out.println(g1.age);
        g1.name ="小诗诗";
        g1.age = 18;
        g1.gender="女";

        //获取对象
        System.out.println(g1.name);
        System.out.println(g1.age);
        System.out.println(g1.gender);

        g1.sleep();
        g1.eat();



        GirlFriend g2 = new GirlFriend();
        g2.name="小丹丹";
        g2.age = 19;
        g2.gender = "女";
        System.out.println(g2.name);
        System.out.println(g2.age);
        System.out.println(g2.gender);
        g2.sleep();
        g2.eat();

    }
}
